<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>变量</title>
	</head>
	<body>
		
	</body>
	<script>
		// 创建变量：
		let num;
		num = 10;
		console.log(num);
		let str;
		console.log(str);//未定义
		//常量：定义之后不能修改
		const userName ='admin';
		console.log(userName);
		//userName ='xiaoming';  //不可以重新给常量赋值，执行代码会报错
		console.log(userName);
	</script>
</html>
